package cn.math.appmath.biz.impl;

import java.util.List;

import cn.math.appmath.bean.NoticBean;
import cn.math.appmath.biz.NoticBiz;
import cn.math.appmath.dao.NoticDao;
import cn.math.appmath.entity.Notic;

public class NoticBizImpl implements NoticBiz {
	private NoticDao noticDao;
	
	public boolean delete(int id) {
		return noticDao.delete(id);
	}
	
	public boolean batchDelete(Integer[] ids){
		return noticDao.batchDelete(ids);
	}

	public NoticBean findAll(int page,String param,int messageType) {
		if(param.equals("forward")){
			page = page - 2;
		}
		return noticDao.findAll(page, messageType);
	}

	public Notic findById(Integer id) {
		return noticDao.findById(id);
	}

	public boolean save(Notic notic) {
		return noticDao.save(notic);
	}

	public void update(Notic notic) {
		// TODO Auto-generated method stub

	}

	public void setNoticDao(NoticDao noticDao) {
		this.noticDao = noticDao;
	}
	
	public List<Notic> findTop(String param){
		return noticDao.findTop(param);
	}
}
